home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
051-075
/
disk_074
/
xcopy
/
xcopy.doc
< prev
next >
Wrap
Text File
|
1992-05-06
|
3KB
|
58 lines
This a replacement for the Amiga DOS Copy command. Something that
always bugged me about the ADOS copy is that it sets the date of the
destination file to the current date. This makes it impossible to look at
the dates of 2 files to tell which one is the newer file. Mycopy will set
the date of the destination to the same date as the original file. This
makes it very easy to tell which one is the newer file.
The format of the command is "copy [-au] source [destination]".
Where the options are:
-a all, copy subdirectories
-u update, only copy the file if the source is newer than
the destination.
The -a option will copy the files from any subdirectories in the source
directory. Copy will create the directory in the destination if it does
not already exist.
The -u option will see if a file with the same name exits in the destination
directory and if it does exist it will compare the DateStamp of the files.
If the source file is newer then it will copy it over the destination. If
the source is older or the same it will not copy it. If there is no file
in the destination directory of the same name it will create it and copy
the source to it.
A source file or directory name is always required. If no destination
is specified the the current directory is used. Unix type of wildcards (ie.
* and ?) are allowed in the source file name. The easiest way to describe
everything is with some examples. In the examples f1 and f2 are the names
of files and d1 and d2 are names of directories.
copy f1 f2 simple case
copy f1 d1 copy the file f1 into the directory d1(d1 must exist)
copy d1 f1 WILL NOT WORK
copy d1 d2 copy all files from dir 1 to dir 2 (d2 must exist)
copy -a df0: df1: copy everything from drive 0 to drive 1
copy df0:f1 copy the file f1 to the current directory
copy df0:d1/*.c copy all C file from df0:d1 to the current directory
copy *.c df0:d1 copy all C files from the current directory to df0:d1
df0:d1 must already exist
copy -au df0: df1: copy all files in all directories on drive 0 to
drive 1 if they do not exist or are newer
This command will be especially usefull to anybody using the ram
disks, either the Amiga ram: or the new ASDG ram device vd0:. I have a
2 Meg expansion memory and it is very nice to do all my work on the ram disk
because it is so much faster. For an example of how I use this copy program
I will describe a typical session. I have a directory on a floppy disk for
a C program that I am working on. I copy all the files to a directory on the
ram disk. I then do all my editing and compiling on the ram disk because it
is so much faster. Every once in a while I do the command
"copy -u *.c df1:dir"
which will copy all the files that have a .c extension AND that have been
edited to the floppy disk.
Hope you like it.
Lee Robertson
plink: lmr